﻿using Microsoft.AspNetCore.SignalR;
using System.Security.Claims;

namespace IM.Easy.Api.Hubs
{

    public class UserIdProvider : DefaultUserIdProvider
    {
        public override string? GetUserId(HubConnectionContext connection)
        {
            return connection.User?.FindFirst(ClaimTypes.PrimarySid)?.Value;
        }
    }
}
